<html>

<head>
	<title>openvidu-recording-node</title>

	<meta name="viewport" content="width=device-width, initial-scale=1" charset="utf-8">
	<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">

	<!-- Bootstrap -->
	<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g="
	 crossorigin="anonymous"></script>
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
	 crossorigin="anonymous">
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
	 crossorigin="anonymous"></script>
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
	<!-- Bootstrap -->

	<link rel="styleSheet" href="style.css" type="text/css" media="screen">
	<script src="openvidu-browser-2.12.0.js"></script>
	<script src="app.js"></script>
	<script>
		$(document).ready(function () {
			$('[data-toggle="tooltip"]').tooltip({
				html: true
			});
		});
	</script>
</head>

<body>

	<nav class="navbar navbar-default">
		<div class="container">
			<div class="navbar-header">
				<a class="navbar-brand" href="/">
					<img class="demo-logo" src="images/openvidu_vert_white_bg_trans_cropped.png" /> Recording Node</a>
				<a class="navbar-brand nav-icon" href="https://github.com/OpenVidu/openvidu-tutorials/tree/master/openvidu-recording-node"
				 title="GitHub Repository" target="_blank">
					<i class="fa fa-github" aria-hidden="true"></i>
				</a>
				<a class="navbar-brand nav-icon" href="http://www.openvidu.io/docs/tutorials/openvidu-js-node/" title="Documentation"
				 target="_blank">
					<i class="fa fa-book" aria-hidden="true"></i>
				</a>
			</div>
		</div>
	</nav>

	<div id="main-container" class="container">
		<div id="join" class="vertical-center">
			<div id="img-div">
				<img src="images/openvidu_grey_bg_transp_cropped.png" />
			</div>
			<div id="join-dialog" class="jumbotron">
				<h1>Join a video session</h1>
				<form class="form-group" onsubmit="return false">
					<p>
						<label>Session</label>
						<input class="form-control" type="text" id="sessionName" value="SessionA" required>
					</p>
					<p class="text-center">
						<button class="btn btn-lg btn-success" id="join-btn" onclick="joinSession()">Join!</button>
					</p>
				</form>
				<hr>
			</div>
		</div>

		<div id="session" style="display: none">
			<div id="session-header">
				<h1 id="session-title"></h1>
				<input class="btn btn-sm btn-danger" type="button" id="buttonCloseSession" onmouseup="closeSession()" value="Close session">
				<input class="btn btn-sm btn-danger" type="button" id="buttonLeaveSession" onmouseup="removeUser(); leaveSession()"
				 value="Leave session">
				<div class="vertical-separator-top"></div>
				<input class="form-control" id="forceValue" type="text" onkeyup="checkBtnsForce()">
				<input class="btn btn-sm" type="button" id="buttonForceUnpublish" onmouseup="forceUnpublish()" value="Force unpublish"
				 disabled>
				<input class="btn btn-sm" type="button" id="buttonForceDisconnect" onmouseup="forceDisconnect()" value="Force disconnect"
				 disabled>
				<div class="vertical-separator-top"></div>
				<input class="btn btn-sm" type="button" id="buttonFetchInfo" onmouseup="fetchInfo()" value="Fetch info">
				<input class="btn btn-sm" type="button" id="buttonFetchAll" onmouseup="fetchAll()" value="Fetch all">
			</div>
			<div id="video-container" class="col-md-12"></div>
			<div id="recording-btns">
				<div class="btns">
					<input class="btn btn-md" type="button" id="buttonStartRecording" onmouseup="startRecording()" value="Start recording">
					<form>
						<label class="radio-inline">
							<input type="radio" name="outputMode" value="COMPOSED" id="radio-composed" checked>COMPOSED
						</label>
						<label class="radio-inline">
							<input type="radio" name="outputMode" value="INDIVIDUAL" id="radio-individual">INDIVIDUAL
						</label>
					</form>
					<form>
						<label class="checkbox-inline">
							<input type="checkbox" id="has-audio-checkbox" checked>Has audio
						</label>
						<label class="checkbox-inline">
							<input type="checkbox" id="has-video-checkbox" checked>Has video
						</label>
					</form>
				</div>
				<div class="btns">
					<input class="btn btn-md" type="button" id="buttonListRecording" onmouseup="listRecordings()" value="List recordings">
					<div class="vertical-separator-bottom"></div>
					<input class="btn btn-md" type="button" id="buttonGetRecording" onmouseup="getRecording()" value="Get recording"
					 disabled>
					<input class="btn btn-md" type="button" id="buttonStopRecording" onmouseup="stopRecording()" value="Stop recording"
					 disabled>
					<input class="btn btn-md" type="button" id="buttonDeleteRecording" onmouseup="deleteRecording()" value="Delete recording"
					 disabled>
					<input class="form-control" id="forceRecordingId" type="text" onkeyup="checkBtnsRecordings()">
				</div>
				<div class="textarea-container" id="textarea-http-container">
					<button type="button" class="btn btn-outline-secondary" id="clear-http-btn" onclick="clearHttpTextarea()">Clear</button>
					<span>HTTP responses</span>
					<textarea id="textarea-http" readonly="true" class="form-control" name="textarea-http"></textarea>
				</div>
				<div class="textarea-container" id="textarea-events-container">
					<button type="button" class="btn btn-outline-secondary" id="clear-events-btn" onclick="clearEventsTextarea()">Clear</button>
					<span>OpenVidu events</span>
					<textarea id="textarea-events" readonly="true" class="form-control" name="textarea-events"></textarea>
				</div>
			</div>
		</div>
	</div>

	<footer class="footer">
		<div class="container">
			<div class="text-muted">OpenVidu © 2017</div>
			<a href="http://www.openvidu.io/" target="_blank">
				<img class="openvidu-logo" src="images/openvidu_globe_bg_transp_cropped.png" />
			</a>
		</div>
	</footer>

</body>

</html>